home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / CIncludes / CMAcceleration.h < prev    next >
C/C++ Source or Header  |  1996-05-01  |  4KB  |  128 lines

  1. /*
  2.      File:        CMAcceleration.h
  3.  
  4.      Contains:    ColorSync 2.0 Acceleration Component Interfaces
  5.  
  6.      Version:    Technology:    ColorSync 2.0
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. */
  18. #ifndef __CMACCELERATION__
  19. #define __CMACCELERATION__
  20.  
  21. #ifndef __MEMORY__
  22. #include <Memory.h>
  23. #endif
  24. #ifndef __COMPONENTS__
  25. #include <Components.h>
  26. #endif
  27. #ifndef __CMAPPLICATION__
  28. #include <CMApplication.h>
  29. #endif
  30.  
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34.  
  35. #if PRAGMA_IMPORT_SUPPORTED
  36. #pragma import on
  37. #endif
  38.  
  39. #if PRAGMA_ALIGN_SUPPORTED
  40. #pragma options align=mac68k
  41. #endif
  42.  
  43. #if FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE
  44. /* -------------------------------------- version info */
  45.  
  46. enum {
  47.     cmAccelerationInterfaceVersion = 1
  48. };
  49.  
  50. /* -------------------------------------- Component Type */
  51.  
  52. enum {
  53.     cmAccelerationComponentType    = 'csac'
  54. };
  55.  
  56. /* -------------------------------------- Required Component function selectors */
  57.  
  58. enum {
  59.     cmLoadTables                = 0,
  60.     cmCalculateData                = 1
  61. };
  62.  
  63. /* -------------------------------------- table data for acceleration component */
  64. struct CMAccelerationTableData {
  65.     long                             inputLutEntryCount;            /* count of entries for input lut for one dimension*/
  66.     long                             inputLutWordSize;            /* count of bits of each entry ( e.g. 16 for WORD )*/
  67.     Handle                             inputLut;                    /* handle to input lut*/
  68.     long                             outputLutEntryCount;        /* count of entries for output lut for one dimension    */
  69.     long                             outputLutWordSize;            /* count of bits of each entry ( e.g. 8 for BYTE )*/
  70.     Handle                             outputLut;                    /* handle to output lut*/
  71.     long                             colorLutInDim;                /* input dimension  ( e.g. 3 for LAB ; 4 for CMYK )*/
  72.     long                             colorLutOutDim;                /* output dimension ( e.g. 3 for LAB ; 4 for CMYK )*/
  73.     long                             colorLutGridPoints;            /* count of gridpoints for color lut ( for one Dimension )    */
  74.     long                             colorLutWordSize;            /* count of bits of each entry ( e.g. 8 for BYTE )*/
  75.     Handle                             colorLut;                    /* handle to color lut*/
  76.     CMBitmapColorSpace                 inputColorSpace;            /* packing info for input*/
  77.     CMBitmapColorSpace                 outputColorSpace;            /* packing info for output*/
  78.     void *                            userData;
  79.     unsigned long                     reserved1;
  80.     unsigned long                     reserved2;
  81.     unsigned long                     reserved3;
  82.     unsigned long                     reserved4;
  83.     unsigned long                     reserved5;
  84. };
  85. typedef struct CMAccelerationTableData CMAccelerationTableData;
  86.  
  87. typedef CMAccelerationTableData *CMAccelerationTableDataPtr;
  88. typedef CMAccelerationTableDataPtr *CMAccelerationTableDataHdl;
  89. /* -------------------------------------- calc data for acceleration component */
  90. struct CMAccelerationCalcData {
  91.     long                             pixelCount;                    /* count of input pixels*/
  92.     Ptr                             inputData;                    /* input array*/
  93.     Ptr                             outputData;                    /* output array*/
  94.     unsigned long                     reserved1;
  95.     unsigned long                     reserved2;
  96. };
  97. typedef struct CMAccelerationCalcData CMAccelerationCalcData;
  98.  
  99. typedef CMAccelerationCalcData *CMAccelerationCalcDataPtr;
  100. typedef CMAccelerationCalcDataPtr *CMAccelerationCalcDataHdl;
  101. /*
  102.  ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
  103.                 A c c e l e r a t i o n   C o m p o n e n t   I n t e r f a c e s
  104.  ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
  105. */
  106. extern pascal CMError CMAccelerationLoadTables(ComponentInstance CMSession, CMAccelerationTableDataPtr tableData)
  107.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0000, 0x7000, 0xA82A);
  108.  
  109. extern pascal CMError CMAccelerationCalculateData(ComponentInstance CMSession, CMAccelerationCalcDataPtr calcData)
  110.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0001, 0x7000, 0xA82A);
  111.  
  112. #endif
  113.  
  114. #if PRAGMA_ALIGN_SUPPORTED
  115. #pragma options align=reset
  116. #endif
  117.  
  118. #if PRAGMA_IMPORT_SUPPORTED
  119. #pragma import off
  120. #endif
  121.  
  122. #ifdef __cplusplus
  123. }
  124. #endif
  125.  
  126. #endif /* __CMACCELERATION__ */
  127.  
  128.